import Vue from 'vue';
import VueRouter from 'vue-router';
import hexagram from "./components/hexagram";
import plumagram from "./components/plumagram"
Vue.use(VueRouter);



const router = new VueRouter({
    routes: [{
        path: "/", component: hexagram, meta: {title: "六爻-乾坤易", logoName: "六爻", tableName: "hexagrams"}
    },
    {
        path: "/plumagram", component: plumagram, meta: {title: "梅花-乾坤易", logoName: "梅花", tableName: "plumagrams"}
    }]
});

router.beforeEach((to, from , next) => {
    document.title = to.meta.title;
    next();
});

export default router;
